<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>进程管理：计算机的数字舞台</title>
    <link rel="stylesheet" href="https://cdn.staticfile.org/font-awesome/6.4.0/css/all.min.css">
    <link rel="stylesheet" href="https://cdn.staticfile.org/tailwindcss/2.2.19/tailwind.min.css">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.min.js"></script>
    <style>
        body {
            font-family: 'Noto Sans SC', Tahoma, Arial, Roboto, "Droid Sans", "Helvetica Neue", "Droid Sans Fallback", "Heiti SC", "Hiragino Sans GB", Simsun, sans-serif;
            background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
            min-height: 100vh;
        }
        
        .hero-gradient {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        }
        
        .card-hover {
            transition: all 0.3s ease;
        }
        
        .card-hover:hover {
            transform: translateY(-5px);
            box-shadow: 0 20px 40px rgba(0,0,0,0.1);
        }
        
        .text-gradient {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }
        
        .drop-cap {
            float: left;
            font-size: 4rem;
            line-height: 1;
            font-weight: 700;
            margin-right: 0.5rem;
            margin-top: -0.2rem;
            color: #667eea;
            font-family: 'Noto Serif SC', serif;
        }
        
        .section-divider {
            position: relative;
            text-align: center;
            margin: 3rem 0;
        }
        
        .section-divider::before {
            content: '';
            position: absolute;
            top: 50%;
            left: 0;
            right: 0;
            height: 1px;
            background: linear-gradient(to right, transparent, #e0e0e0, transparent);
        }
        
        .section-divider i {
            position: relative;
            background: white;
            padding: 0 1rem;
            color: #667eea;
        }
        
        @keyframes float {
            0% { transform: translateY(0px); }
            50% { transform: translateY(-10px); }
            100% { transform: translateY(0px); }
        }
        
        .float-animation {
            animation: float 3s ease-in-out infinite;
        }
        
        .mermaid {
            display: flex;
            justify-content: center;
            margin: 2rem 0;
        }
    </style>
</head>
<body>
    <!-- Hero Section -->
    <section class="hero-gradient text-white py-20 px-6">
        <div class="max-w-6xl mx-auto text-center">
            <h1 class="text-5xl md:text-6xl font-bold mb-6 tracking-tight">
                <i class="fas fa-microchip mr-4"></i>进程管理
            </h1>
            <p class="text-2xl md:text-3xl font-light mb-8">计算机的数字舞台</p>
            <p class="text-lg md:text-xl max-w-3xl mx-auto leading-relaxed opacity-90">
                在计算机的世界里，进程如同舞台上的演员，而操作系统则是这场精彩演出的导演。让我们一起揭开进程管理的神秘面纱，探索计算机运行的核心奥秘。
            </p>
        </div>
    </section>

    <!-- Main Content -->
    <main class="max-w-6xl mx-auto px-6 py-12">
        <!-- Introduction -->
        <section class="bg-white rounded-2xl shadow-xl p-8 md:p-12 mb-12 card-hover">
            <p class="text-lg leading-relaxed text-gray-700">
                <span class="drop-cap">在</span>计算机领域，进程管理是操作系统中一项至关重要的任务。理解进程管理的基本概念将为我们打开计算机运行的神秘大门，使计算机小白也能够轻松了解这一核心功能。
            </p>
        </section>

        <!-- What is Process -->
        <section class="mb-16">
            <div class="section-divider">
                <i class="fas fa-cogs text-2xl"></i>
            </div>
            
            <div class="bg-white rounded-2xl shadow-xl p-8 md:p-12 card-hover">
                <h2 class="text-3xl font-bold mb-6 text-gradient flex items-center">
                    <i class="fas fa-question-circle mr-3"></i>什么是进程？
                </h2>
                <p class="text-lg leading-relaxed text-gray-700 indent-8">
                    首先，让我们来理解一下进程的概念。在计算机中，进程是指计算机中正在运行的程序的实例。可以把进程比作在舞台上表演的演员，每个演员都是一个独立的个体，有自己的任务和动作。
                </p>
                
                <!-- Visual Representation -->
                <div class="mt-8 bg-gradient-to-r from-purple-50 to-pink-50 rounded-xl p-6">
                    <div class="grid grid-cols-1 md:grid-cols-3 gap-6 text-center">
                        <div class="float-animation">
                            <i class="fas fa-user-circle text-5xl text-purple-600 mb-3"></i>
                            <p class="font-semibold text-gray-700">独立个体</p>
                        </div>
                        <div class="float-animation" style="animation-delay: 0.5s;">
                            <i class="fas fa-tasks text-5xl text-pink-600 mb-3"></i>
                            <p class="font-semibold text-gray-700">专属任务</p>
                        </div>
                        <div class="float-animation" style="animation-delay: 1s;">
                            <i class="fas fa-play-circle text-5xl text-indigo-600 mb-3"></i>
                            <p class="font-semibold text-gray-700">独立运行</p>
                        </div>
                    </div>
                </div>
            </div>
        </section>

        <!-- Basic Functions -->
        <section class="mb-16">
            <div class="section-divider">
                <i class="fas fa-layer-group text-2xl"></i>
            </div>
            
            <h2 class="text-3xl font-bold mb-8 text-center text-gradient">进程管理的基本功能</h2>
            
            <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
                <div class="bg-white rounded-xl shadow-lg p-6 card-hover">
                    <div class="flex items-start">
                        <div class="bg-purple-100 rounded-full p-3 mr-4">
                            <i class="fas fa-plus-circle text-2xl text-purple-600"></i>
                        </div>
                        <div>
                            <h3 class="text-xl font-bold mb-2 text-gray-800">进程的创建和终止</h3>
                            <p class="text-gray-600 leading-relaxed">
                                操作系统负责启动和结束各种进程。当你双击一个应用程序图标时，操作系统就创建了一个相应的进程。而在你关闭应用程序时，相应的进程也会被终止。
                            </p>
                        </div>
                    </div>
                </div>
                
                <div class="bg-white rounded-xl shadow-lg p-6 card-hover">
                    <div class="flex items-start">
                        <div class="bg-pink-100 rounded-full p-3 mr-4">
                            <i class="fas fa-calendar-alt text-2xl text-pink-600"></i>
                        </div>
                        <div>
                            <h3 class="text-xl font-bold mb-2 text-gray-800">进程调度</h3>
                            <p class="text-gray-600 leading-relaxed">
                                操作系统需要合理地分配计算机的资源给不同的进程，以确保它们能够有序运行。就像一个舞台剧导演需要决定每个演员何时登场一样，操作系统决定了每个进程何时执行。
                            </p>
                        </div>
                    </div>
                </div>
                
                <div class="bg-white rounded-xl shadow-lg p-6 card-hover">
                    <div class="flex items-start">
                        <div class="bg-indigo-100 rounded-full p-3 mr-4">
                            <i class="fas fa-comments text-2xl text-indigo-600"></i>
                        </div>
                        <div>
                            <h3 class="text-xl font-bold mb-2 text-gray-800">进程间通信</h3>
                            <p class="text-gray-600 leading-relaxed">
                                有时，不同的进程需要相互通信和共享数据。进程管理提供了机制，使得进程能够有效地进行信息交流。
                            </p>
                        </div>
                    </div>
                </div>
                
                <div class="bg-white rounded-xl shadow-lg p-6 card-hover">
                    <div class="flex items-start">
                        <div class="bg-green-100 rounded-full p-3 mr-4">
                            <i class="fas fa-traffic-light text-2xl text-green-600"></i>
                        </div>
                        <div>
                            <h3 class="text-xl font-bold mb-2 text-gray-800">进程状态管理</h3>
                            <p class="text-gray-600 leading-relaxed">
                                操作系统会追踪每个进程的状态，包括就绪、运行、阻塞等。这就像是一个演员的不同状态，有时在舞台上活跃，有时在后台等待登场。
                            </p>
                        </div>
                    </div>
                </div>
            </div>
        </section>

        <!-- Process State Diagram -->
        <section class="mb-16">
            <div class="bg-white rounded-2xl shadow-xl p-8 md:p-12">
                <h3 class="text-2xl font-bold mb-6 text-center text-gray-800">
                    <i class="fas fa-project-diagram mr-3 text-purple-600"></i>进程状态转换图
                </h3>
                <div class="mermaid">
                    graph LR
                        A[新建] -->|分配资源| B[就绪]
                        B -->|调度| C[运行]
                        C -->|时间片用完| B
                        C -->|等待I/O| D[阻塞]
                        D -->|I/O完成| B
                        C -->|完成| E[终止]
                        
                        style A fill:#f9f,stroke:#333,stroke-width:2px
                        style B fill:#9f9,stroke:#333,stroke-width:2px
                        style C fill:#ff9,stroke:#333,stroke-width:2px
                        style D fill:#f99,stroke:#333,stroke-width:2px
                        style E fill:#999,stroke:#333,stroke-width:2px
                </div>
            </div>
        </section>

        <!-- Why Process Management -->
        <section class="mb-16">
            <div class="section-divider">
                <i class="fas fa-lightbulb text-2xl"></i>
            </div>
            
            <div class="bg-gradient-to-r from-purple-600 to-pink-600 rounded-2xl shadow-xl p-8 md:p-12 text-white">
                <h2 class="text-3xl font-bold mb-8 flex items-center">
                    <i class="fas fa-question mr-3"></i>为什么需要进程管理？
                </h2>
                
                <div class="grid grid-cols-1 md:grid-cols-3 gap-6">
                    <div class="bg-white bg-opacity-20 backdrop-blur rounded-xl p-6">
                        <i class="fas fa-chart-pie text-4xl mb-4"></i>
                        <h3 class="text-xl font-bold mb-2">资源合理利用</h3>
                        <p class="opacity-90">进程管理确保计算机的资源被有效利用，不同的任务能够共享计算机的处理能力。</p>
                    </div>
                    
                    <div class="bg-white bg-opacity-20 backdrop-blur rounded-xl p-6">
                        <i class="fas fa-sync-alt text-4xl mb-4"></i>
                        <h3 class="text-xl font-bold mb-2">任务协调</h3>
                        <p class="opacity-90">通过进程管理，操作系统可以协调不同进程之间的执行顺序，确保它们按照既定的计划运行。</p>
                    </div>
                    
                    <div class="bg-white bg-opacity-20 backdrop-blur rounded-xl p-6">
                        <i class="fas fa-user-check text-4xl mb-4"></i>
                        <h3 class="text-xl font-bold mb-2">响应用户需求</h3>
                        <p class="opacity-90">用户可以同时运行多个应用程序，而进程管理确保它们能够在计算机上和谐共存。</p>
                    </div>
                </div>
            </div>
        </section>

        <!-- Scheduling Algorithms -->
        <section class="mb-16">
            <div class="section-divider">
                <i class="fas fa-clock text-2xl"></i>
            </div>
            
            <div class="bg-white rounded-2xl shadow-xl p-8 md:p-12">